"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Service = void 0;
const path_1 = require("path");
const core_1 = require("@umijs/core");
class Service extends core_1.Service {
    constructor(opts) {
        process.env.UMI_VERSION = require('umi/package').version;
        process.env.UMI_DIR = path_1.dirname(require.resolve('umi/package'));
        super(Object.assign(Object.assign({}, opts), { presets: [
                require.resolve('@umijs/preset-built-in'),
                ...(opts.presets || []),
            ], plugins: [
                require.resolve('./plugins/commands/start/start'),
                ...(opts.plugins || []),
            ] }));
    }
}
exports.Service = Service;
